<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>关键词列表</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="reserved.html">保留字列表</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="reserved.classes.html">预定义类</a></div>
 <div class="up"><a href="reserved.html">保留字列表</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="reserved.keywords" class="sect1">
 <h2 class="title">关键词列表</h2>
  <p class="simpara">
   这些词语在 PHP 中有着特殊的意义。它们中有些像是函数，有些像是常量……但是它们不是的，它们只是语言结构的一部分。不能使用它们的任何一个作为常量、方法名或是类名。但是可以将它们作为变量名使用，不过这样会导致混淆。
  </p>

  <table class="doctable table">
   <caption><strong>PHP 关键词</strong></caption>
   
    <tbody class="tbody">
     <tr>
      <td>
       <a href="language.operators.logical.html" class="link">and</a>
      </td>
      <td>
       <a href="language.operators.logical.html" class="link">or</a>
      </td>
      <td>
       <a href="language.operators.logical.html" class="link">xor</a>
      </td>
      <td>
       <a href="language.constants.predefined.html" class="link">__FILE__</a>
      </td>
      <td>
       <a href="reserved.classes.html#reserved.classes.php5" class="link">exception</a> (PHP 5)
      </td>
     </tr>

      <tr>
      <td>
       <a href="language.constants.predefined.html" class="link">__LINE__</a>
      </td>
      <td>
       <span class="function"><a href="function.array.html" class="function">array()</a></span>
      </td>
      <td>
       <a href="control-structures.foreach.html" class="link">as</a>
      </td>
      <td>
       <a href="control-structures.break.html" class="link">break</a>
      </td>
      <td>
       <a href="control-structures.switch.html" class="link">case</a>
      </td>
     </tr>

     <tr>
      <td>
       <a href="keyword.class.html" class="link">class</a>
      </td>
      <td>
       <a href="language.oop5.constants.html" class="link">const</a>
      </td>
      <td>
       <a href="control-structures.continue.html" class="link">continue</a>
      </td>
      <td>
       <a href="control-structures.declare.html" class="link">declare</a>
      </td>
      <td>
       <a href="control-structures.switch.html" class="link">default</a>
      </td>
     </tr>

     <tr>
      <td>
       <span class="function"><a href="function.die.html" class="function">die()</a></span>
      </td>
      <td>
       <a href="control-structures.do.while.html" class="link">do</a>
      </td>
      <td>
       <span class="function"><a href="function.echo.html" class="function">echo</a></span>
      </td>
      <td>
       <a href="control-structures.else.html" class="link">else</a>
      </td>
      <td>
       <a href="control-structures.elseif.html" class="link">elseif</a>
      </td>
     </tr>

     <tr>
      <td>
       <span class="function"><a href="function.empty.html" class="function">empty()</a></span>
      </td>
      <td>
       <a href="control-structures.declare.html" class="link">enddeclare</a>
      </td>
      <td>
       <a href="control-structures.alternative-syntax.html" class="link">endfor</a>
      </td>
      <td>
       <a href="control-structures.alternative-syntax.html" class="link">endforeach</a>
      </td>
      <td>
       <a href="control-structures.alternative-syntax.html" class="link">endif</a>
      </td>
     </tr>

     <tr>
      <td>
       <a href="control-structures.alternative-syntax.html" class="link">endswitch</a>
      </td>
      <td>
       <a href="control-structures.alternative-syntax.html" class="link">endwhile</a>
      </td>
      <td>
       <span class="function"><a href="function.eval.html" class="function">eval()</a></span>
      </td>
      <td>
       <span class="function"><a href="function.exit.html" class="function">exit()</a></span>
      </td>
      <td>
       <a href="keyword.class.html" class="link">extends</a>
      </td>
     </tr>

     <tr>
      <td>
       <a href="control-structures.for.html" class="link">for</a>
      </td>
      <td>
       <a href="control-structures.foreach.html" class="link">foreach</a>
      </td>
      <td>
       <a href="functions.user-defined.html" class="link">function</a>
      </td>
      <td>
       <a href="language.variables.scope.html" class="link">global</a>
      </td>
      <td>
       <a href="control-structures.if.html" class="link">if</a>
      </td>
     </tr>

     <tr>
      <td>
       <span class="function"><a href="function.include.html" class="function">include</a></span>
      </td>
      <td>
       <span class="function"><a href="function.include-once.html" class="function">include_once</a></span>
      </td>
      <td>
       <span class="function"><a href="function.isset.html" class="function">isset()</a></span>
      </td>
      <td>
       <span class="function"><a href="function.list.html" class="function">list()</a></span>
      </td>
      <td>
       <a href="keyword.class.html" class="link">new</a>
      </td>
     </tr>

     <tr>
      <td>
       <span class="function"><a href="function.print.html" class="function">print</a></span>
      </td>
      <td>
       <span class="function"><a href="function.require.html" class="function">require</a></span>
      </td>
      <td>
       <span class="function"><a href="function.require-once.html" class="function">require_once</a></span>
      </td>
      <td>
       <span class="function"><a href="function.return.html" class="function">return</a></span>
      </td>
      <td>
       <a href="language.variables.scope.html" class="link">static</a>
      </td>
     </tr>

     <tr>
      <td>
       <a href="control-structures.switch.html" class="link">switch</a>
      </td>
      <td>
       <span class="function"><a href="function.unset.html" class="function">unset()</a></span>
      </td>
      <td>
       use
      </td>
      <td>
       <a href="keyword.class.html" class="link">var</a>
      </td>
      <td>
       <a href="control-structures.while.html" class="link">while</a>
      </td>
     </tr>

     <tr>
      <td>
       <a href="language.constants.predefined.html" class="link">__FUNCTION__</a>
      </td>
      <td>
       <a href="language.constants.predefined.html" class="link">__CLASS__</a>
      </td>
      <td>
       <a href="language.constants.predefined.html" class="link">__METHOD__</a>
      </td>
      <td>
       <a href="language.oop5.final.html" class="link">final</a> (PHP 5)
      </td>
      <td>
       <a href="reserved.classes.html#reserved.classes.php5" class="link">php_user_filter</a> (PHP 5)
      </td>
     </tr>

     <tr>
      <td>
       <a href="language.oop5.interfaces.html" class="link">interface</a> (PHP 5)
      </td>
      <td>
       <a href="language.oop5.interfaces.html" class="link">implements</a> (PHP 5)
      </td>
      <td>
       <a href="language.oop5.basic.html" class="link">extends</a>
      </td>
      <td>
       <a href="language.oop5.visibility.html" class="link">public</a> (PHP 5)
      </td>
      <td>
       <a href="language.oop5.visibility.html" class="link">private</a> (PHP 5)
      </td>
     </tr>

     <tr>
      <td>
       <a href="language.oop5.visibility.html" class="link">protected</a> (PHP 5)
      </td>
      <td>
       <a href="language.oop5.abstract.html" class="link">abstract</a> (PHP 5)
      </td>
      <td>
       <a href="language.oop5.cloning.html" class="link">clone</a> (PHP 5)
      </td>
      <td>
       <a href="language.exceptions.html" class="link">try</a> (PHP 5)
      </td>
      <td>
       <a href="language.exceptions.html" class="link">catch</a> (PHP 5)
      </td>
     </tr>

     <tr>
      <td>
       <a href="language.exceptions.html" class="link">throw</a> (PHP 5)
      </td>
      <td>
       cfunction (PHP 4 only)
      </td>      
      <td>
       <a href="keyword.class.html" class="link">this</a> (PHP 5 only)
      </td>
      <td>
      </td>
     </tr>

    </tbody>
   
  </table>

 </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="reserved.html">保留字列表</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="reserved.classes.html">预定义类</a></div>
 <div class="up"><a href="reserved.html">保留字列表</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
